import request from '@/utils/request'

export function getMangerInfo(data) {
    return request({
        url: '/admin',
        method: 'get',
        params: { data }
    })
}
export function addManger(data) {
    return request({
        url: '/admin/create',
        method: 'get',
        params: data
    })
}
export function removeManager(id) {
    return request({
        url: `/admin/${id}`,
        method: 'delete'
    })
}
export function addPowers(data) {
    return request({
        url: '/admin/updateRole',
        method: 'put',
        params: data
    })
}

export function searchFor(data) {
    return request({
        url: '/searchAdmin',
        method: 'get',
        params: data
    })
}

export function getTotal() {
    return request({
        url: '/getAllTableNumbers',
        method: 'get',
        params: { table_name: 'admin' }
    })
}